Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of VAULT-18307 Vault incorrectly requeues credentials when the rotation period is updated into release/1.15.x #23768

Conversation

hc-github-team-secure-vault-core
Copy link
Collaborator

Backport

This PR is auto-generated from #23528 to be assessed for backporting due to the inclusion of the label backport/1.15.x.

The below text is copied from the body of the original PR.


This PR implements a hopefully simple fix where Vault wouldn't reprioritize credentials when the rotation period was changed. Tests are incoming, but I wanted to get some thoughts on a question below:

The question that invites some bikeshedding is how to update the 'next rotation time' period -

Right now, I am doing the simplest case - take the current time, add the rotation period. This is easy to understand, but if, say someone updates a 30 day rotation to a 45 day rotation, could result in a rotation period (just this once) that is much longer than expected.

Another way would be to update the next rotation time to be "as though" it was with the new rotation period, e.g., if you update a 30d period to 45d, we would add only 15 days. If you lowered the rotation period to 20d, we would subtract 10 days. This could result in a priority in the past, which might be unexpected, but would be programmatically fine - the credential would simply rotate the next time the queue is checked.

There are also hybrid approaches possible, of course, trading off complexity with trying to do "what people would want".


Overview of commits

@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/VAULT-18307/aws-static-roles-rotation-fixes/remarkably-charming-kangaroo branch from 3e8b670 to 0d1dde4 Compare October 20, 2023 15:40
@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/VAULT-18307/aws-static-roles-rotation-fixes/remarkably-charming-kangaroo branch from 57ec747 to 24df336 Compare October 20, 2023 15:40
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Oct 20, 2023
@kpcraig kpcraig added this to the 1.15.1 milestone Oct 20, 2023
@github-actions
Copy link

Build Results:
All builds succeeded! ✅

@github-actions
Copy link

CI Results:
All Go tests succeeded! ✅

Copy link
Contributor

@kpcraig kpcraig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(pending resolution of the vercel build issue)

@kpcraig kpcraig merged commit ce0c6f9 into release/1.15.x Oct 20, 2023
@kpcraig kpcraig deleted the backport/VAULT-18307/aws-static-roles-rotation-fixes/remarkably-charming-kangaroo branch October 20, 2023 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants